<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Origami::Text::State</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Origami::Text::State</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/origami/graphics/text_rb.html">
                origami/graphics/text.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000048">begin_text_object</a>&nbsp;&nbsp;
      <a href="#M000049">end_text_object</a>&nbsp;&nbsp;
      <a href="#M000047">is_in_text_object?</a>&nbsp;&nbsp;
      <a href="#M000045">new</a>&nbsp;&nbsp;
      <a href="#M000046">reset</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">char_spacing</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">font</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">font_size</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">leading</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">rendering_mode</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">scaling</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">text_knockout</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">text_line_matrix</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">text_matrix</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">text_rendering_matrix</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">text_rise</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">word_spacing</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000045" class="method-detail">
        <a name="M000045"></a>

        <div class="method-heading">
          <a href="#M000045" class="method-signature">
          <span class="method-name">new</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000045-source">
<pre>
    <span class="ruby-comment cmt"># File origami/graphics/text.rb, line 61</span>
61:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
62:         <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">reset</span>
63:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000048" class="method-detail">
        <a name="M000048"></a>

        <div class="method-heading">
          <a href="#M000048" class="method-signature">
          <span class="method-name">begin_text_object</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000048-source">
<pre>
     <span class="ruby-comment cmt"># File origami/graphics/text.rb, line 92</span>
 92:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">begin_text_object</span>
 93:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_in_text_object?</span>
 94:           <span class="ruby-identifier">raise</span> <span class="ruby-constant">TextStateError</span>, 
 95:             <span class="ruby-value str">&quot;Cannot start a text object within an existing text object.&quot;</span>
 96:         <span class="ruby-keyword kw">end</span>
 97: 
 98:         <span class="ruby-ivar">@text_object</span> = <span class="ruby-keyword kw">true</span>
 99:         <span class="ruby-ivar">@text_matrix</span> = 
100:         <span class="ruby-ivar">@text_line_matrix</span> = 
101:         <span class="ruby-ivar">@text_rendering_matrix</span> = <span class="ruby-constant">Matrix</span>.<span class="ruby-identifier">identity</span>(<span class="ruby-value">3</span>)
102:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000049" class="method-detail">
        <a name="M000049"></a>

        <div class="method-heading">
          <a href="#M000049" class="method-signature">
          <span class="method-name">end_text_object</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000049-source">
<pre>
     <span class="ruby-comment cmt"># File origami/graphics/text.rb, line 104</span>
104:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">end_text_object</span>
105:         <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">is_in_text_object?</span>
106:           <span class="ruby-identifier">raise</span> <span class="ruby-constant">TextStateError</span>, 
107:             <span class="ruby-value str">&quot;Cannot end text object : no previous text object has begun.&quot;</span>
108:         <span class="ruby-keyword kw">end</span>
109: 
110:         <span class="ruby-ivar">@text_object</span> = <span class="ruby-keyword kw">false</span>
111:         <span class="ruby-ivar">@text_matrix</span> = 
112:         <span class="ruby-ivar">@text_line_matrix</span> = 
113:         <span class="ruby-ivar">@text_rendering_matrix</span> = <span class="ruby-keyword kw">nil</span>
114:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000047" class="method-detail">
        <a name="M000047"></a>

        <div class="method-heading">
          <a href="#M000047" class="method-signature">
          <span class="method-name">is_in_text_object?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000047-source">
<pre>
    <span class="ruby-comment cmt"># File origami/graphics/text.rb, line 88</span>
88:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_in_text_object?</span>
89:         <span class="ruby-ivar">@text_object</span>
90:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000046" class="method-detail">
        <a name="M000046"></a>

        <div class="method-heading">
          <a href="#M000046" class="method-signature">
          <span class="method-name">reset</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000046-source">
<pre>
    <span class="ruby-comment cmt"># File origami/graphics/text.rb, line 65</span>
65:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
66:         
67:         <span class="ruby-ivar">@char_spacing</span> = <span class="ruby-value">0</span>
68:         <span class="ruby-ivar">@word_spacing</span> = <span class="ruby-value">0</span>
69:         <span class="ruby-ivar">@scaling</span> = <span class="ruby-value">100</span>
70:         <span class="ruby-ivar">@leading</span> = <span class="ruby-value">0</span>
71:         <span class="ruby-ivar">@font</span> = <span class="ruby-keyword kw">nil</span>
72:         <span class="ruby-ivar">@font_size</span> = <span class="ruby-keyword kw">nil</span>
73:         <span class="ruby-ivar">@rendering_mode</span> = <span class="ruby-constant">Rendering</span><span class="ruby-operator">::</span><span class="ruby-constant">FILL</span>
74:         <span class="ruby-ivar">@text_rise</span> = <span class="ruby-value">0</span>
75:         <span class="ruby-ivar">@text_knockout</span> = <span class="ruby-keyword kw">true</span>
76: 
77:         <span class="ruby-comment cmt">#</span>
78:         <span class="ruby-comment cmt"># Text objects</span>
79:         <span class="ruby-comment cmt">#</span>
80: 
81:         <span class="ruby-ivar">@text_object</span> = <span class="ruby-keyword kw">false</span>
82:         <span class="ruby-ivar">@text_matrix</span> = 
83:         <span class="ruby-ivar">@text_line_matrix</span> = 
84:         <span class="ruby-ivar">@text_rendering_matrix</span> = <span class="ruby-keyword kw">nil</span>
85: 
86:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>